package cn.zust.ly.ExExample.Ex03;

import java.util.Scanner;

/**
 * Created by liy on 2016/11/14.
 */
public class Main2 {

    public static void main(String[] args) {

        Scanner sc = new Scanner(System.in);

        int a = sc.nextInt();
        System.out.println(getFibonnacci(a));

    }

    public static int getFibonnacci(int i) {
        if (i <0) return 0;
        else if (i == 0) return 1;
        else if (i == 1) return 1;
        else if (i == 2) return 1;
        else {
            return (getFibonnacci(i-1) + getFibonnacci(i-2))%10007;
        }
    }

}
